import service from "@/utils/request";

// 客服列表 2022-05-26 by 幼稚园扛把子
export function getWorker(){
    return service(
        {
            url:"api/worker",
            method:"get"
        }
    )
}


// 我对客服的评论 2022-05-26 by 幼稚园扛把子
export function getMyEvaluate(uid,wid){
    return service(
        {
            url:"api/worker/evaluate?uid="+uid+"&wid="+wid,
            method:"get"
        }
    )
}

// 提交我对客服的评论 2022-05-26 by 幼稚园扛把子
export function addEvaluate(data){
    return service(
        {
            url:"api/worker/evaluate/add",
            method:"post",
            data:data,
        }
    )
}


// 客服人员登录 2022-06-05 by 幼稚园扛把子
export function Login(data){
    return service(
        {
            url:"api/worker/login",
            method:"post",
            data:data,
        }
    )
}


// 删除活动 2022-06-07 by 幼稚园扛把子
export function deleteActivity(aid){
    return service(
        {
            url:'api/worker/deleteActivity?aid='+aid,
            method:'get',
        }
    )
}


// 查询客服评价 2022-06-07 by 幼稚园扛把子
export function workerEvaluate(wid){
    return service({
        url:'api/worker/workerEvaluate?wid='+wid,
        method:"get",
    })
}

// 获取客服信息
export function WorkerInfo(wid){
    return service({
        url:'api/worker/info?wid='+wid, 
        method:'get'
    })
}

// 上传头像
export function uploadAvatar(file){
    return service(
        {
            url:'api/worker/avatar/upload',
            method:'post',
            data:file
        }
    )
}

// 修改个人设置
export function updateSet(data){
    return service({
        url:'api/worker/update', 
        method:'post',
        data:data
    })
}
